package org.example.exampreparationtreasure.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@TableName("exam_record")
public class ExamRecord implements Serializable {
    @TableId(value = "exam_record_id", type = IdType.ASSIGN_ID)
    private Long examRecordId;

    private Long userId;           // ID
    private Long paperId;          // 试卷ID

    private Long configId;         // 配置ID

    private LocalDateTime startTime;    // 开始时间
    private LocalDateTime endTime;      // 结束时间
    private Integer examDuration;       // 考试用时（分钟）

    private BigDecimal totalScore;      // 总分
    private Integer totalQuestions;     // 总题数
    private Integer correctAnswers;     // 正确题数
    private Integer incorrectAnswers;   // 错误题数
    private BigDecimal accuracy;        // 正确率

    private String status;              // 状态：进行中/已完成/已超时
    private String practiceMode;        // 练习模式：CHAPTER/RANDOM/SPECIALIZED/MOCK_EXAM
    private Long examineeId;       // 考生ID（新增字段）
    private LocalDateTime createTime;
    private LocalDateTime updateTime;
}